<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>控制后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../component/pear/css/pear.css" />
    <link rel="stylesheet" href="../../admin/css/other/console1.css" />
</head>

<body class="pear-container">
    <div>
        <div class="layui-row layui-col-space10">
            <div class="layui-col-xs6 layui-col-md3">
                <div class="layui-card top-panel">
                    <div class="layui-card-header">小说数量</div>
                    <div class="layui-card-body">
                        <div class="layui-row layui-col-space5">
                            <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;" id="booknums">
                                0
                            </div>
                            <div class="layui-col-xs4 layui-col-md4 top-panel-tips">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs6 layui-col-md3">
                <div class="layui-card top-panel">
                    <div class="layui-card-header">分类数量</div>
                    <div class="layui-card-body">
                        <div class="layui-row layui-col-space5">
                            <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;" id="catenums">
                                0
                            </div>
                            <div class="layui-col-xs4 layui-col-md4 top-panel-tips">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs6 layui-col-md3">
                <div class="layui-card top-panel">
                    <div class="layui-card-header">作者数量</div>
                    <div class="layui-card-body">
                        <div class="layui-row layui-col-space5">
                            <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;" id="authornums">
                                0
                            </div>
                            <div class="layui-col-xs4 layui-col-md4  top-panel-tips">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs6 layui-col-md3">
                <div class="layui-card top-panel">
                    <div class="layui-card-header">总章节数量</div>
                    <div class="layui-card-body">
                        <div class="layui-row layui-col-space5">
                            <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;" id="zjnums">
                                0
                            </div>
                            <div class="layui-col-xs4 layui-col-md4  top-panel-tips">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs6 layui-col-md3">
                <div class="layui-card top-panel">
                    <div class="layui-card-header">总字数</div>
                    <div class="layui-card-body">
                        <div class="layui-row layui-col-space5">
                            <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;" id="zongzishu">
                                0
                            </div>
                            <div class="layui-col-xs4 layui-col-md4  top-panel-tips">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs6 layui-col-md3">
                <div class="layui-card top-panel">
                    <div class="layui-card-header">总阅读量</div>
                    <div class="layui-card-body">
                        <div class="layui-row layui-col-space5">
                            <div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;" id="yueduliang">
                                0
                            </div>
                            <div class="layui-col-xs4 layui-col-md4  top-panel-tips">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--</div>-->
    <script src="../../component/layui/layui.js"></script>
    <script src="../../component/pear/pear.js"></script>
    <script>
        layui.use(['layer', 'admin', 'context'], function() {
            var $ = layui.jquery;
            var layer = layui.layer;
            // element = layui.element;
            layui.admin.setConfigType("json");
            layui.admin.setConfigPath("../../config/pear.config.json");
            config = layui.admin.readConfig();
            $.post(config.api.baseurl + "admin/getindex", {
                token: layui.context.get('token'),
                userid: layui.context.get('userid')
            }, function(res) {
                if (res && res.data) {
                    $("#booknums").text(res.data.booknums);
                    $("#catenums").text(res.data.catenums);
                    $("#authornums").text(res.data.authornums);
                    $("#zjnums").text(res.data.zjnums);
                    $("#zongzishu").text(res.data.zongzishu);
                    $("#yueduliang").text(res.data.yueduliang);
                }
            });

        });
    </script>
</body>

</html>